import { ref, computed } from "vue";
import { defineStore } from "pinia";

export const useCommonStateStore = defineStore("commonState", () => {
  //初始状态是展开,isCollpase是pinia中的state
  const isCollapse = ref(false);
  //reverse是pinia中的actions

  function reverse() {
    isCollapse.value = !isCollapse.value;
  }

  return { isCollapse, reverse };
});
